<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>渠道添加</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="//at.alicdn.com/t/font_eolqem241z66flxr.css" media="all" />
</head>
<body class="childrenBody">
	<form class="layui-form" method="post" id="form" th:action="@{/admin/saveChannel}" >
		<input type="hidden" class="id" name="id" th:value="${channel?.id}"/>
		<div class="layui-form-item">
			<label class="layui-form-label">渠道名称</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input name" name="name" lay-verify="required" placeholder=""  th:value="${channel?.name}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">渠道标签</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input tags" name="tags" lay-verify="required" placeholder="" th:value="${channel?.tags}">
			</div>
		</div>
		<input type="hidden" class="layui-input tags" name="isHot" placeholder="" th:value="${channel?.isHot}">
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">渠道描述</label>
			<div class="layui-input-block">
				<textarea name="info" placeholder="请输入内容" class="layui-textarea" th:utext="${channel?.info}"></textarea>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label" >贷款分类</label>
			<div class="layui-input-block" >
				<input th:each="category : ${categorys}" type="checkbox"  name="category" th:value="${category.id}" th:title="${category.name}" th:checked="${category.checked}">
			</div>
		</div>


		<div class="layui-form-item">
			<label class="layui-form-label">渠道链接</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input link"  name="link" lay-verify="required" placeholder="" th:value="${channel?.link}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">渠道额度</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input quotaRange" name="quotaRange" lay-verify="required" placeholder="" th:value="${channel?.quotaRange}">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">成功率</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input successRate" name="successRate" lay-verify="required" placeholder="" th:value="${channel?.successRate}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">期限类型</label>
			<div class="layui-input-block">
				<input type="radio" name="limitType" value="1" title="日" th:checked="${channel?.limitType == 1}" >
				<input type="radio" name="limitType" value="2" title="月" th:checked="${channel?.limitType == 2}" >
				<input type="radio" name="limitType" value="3" title="年" th:checked="${channel?.limitType == 3}" >
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">贷款期限</label>
			<div class="layui-input-inline">
				<input type="number" name="limitMini" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input limitMini" th:value="${channel?.limitMini}">
			</div>
			<div class="layui-form-mid layui-word-aux">-</div>
			<div class="layui-input-inline">
				<input type="number" name="limitMaxmum" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input limitMaxmum" th:value="${channel?.limitMaxmum}">
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">利率</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input interestRate" name="interestRate" lay-verify="required" placeholder="" th:value="${channel?.interestRate}">
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">审核说明</label>
			<div class="layui-input-block">
				<textarea name="instruction" placeholder="请输入内容" class="layui-textarea" th:utext="${channel?.instruction}"></textarea>
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">审核流程</label>
			<div class="layui-input-block">
				<textarea name="flow" placeholder="请输入内容" class="layui-textarea" th:utext="${channel?.flow}"></textarea>
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">审核条件</label>
			<div class="layui-input-block">
				<textarea name="conditions" placeholder="请输入内容" class="layui-textarea" th:utext="${channel?.conditions}"></textarea>
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">重要提醒</label>
			<div class="layui-input-block">
				<textarea name="remind" placeholder="请输入内容" class="layui-textarea" th:utext="${channel?.remind}"></textarea>
			</div>
		</div>

		<div class="layui-form-item">
			<label class="layui-form-label">排序</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input sort" name="sort" lay-verify="required" placeholder="" th:value="${channel?.sort}">
			</div>
		</div>
		<!--<div class="layui-form-item">-->
			<!--<label class="layui-form-label">渠道logo</label>-->
			<!--<div class="layui-input-block">-->
				<!--<input type="file" class="layui-input uploadimg logo" name="file" lay-verify="required" placeholder="" >-->
			<!--</div>-->
		<!--</div>-->

		<div class="layui-form-item">
			<label class="layui-form-label">渠道logo</label>
			<input type="file" name="file" class="layui-upload-file" lay-title="">
			<img th:src="${channel?.logo}" class="layui-circle" sytle="width:50px;height:50px">
			<input type="hidden" class="logo" name="logo" th:value="${channel?.logo}">
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="addNews">立即提交</button>
				<!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
		    </div>
		</div>
	</form>
	<script type="text/javascript" th:src="@{/layui/layui.js}"></script>
	<script type="text/javascript" th:src="@{/js/channel/add.js}"></script>
</body>
</html>